
<template>
	<div class="paper-wrap">
		<n-card>
			<!-- 学生信息 -->
			<div class="paper-title">
				<h2>用牛顿环测量透镜的曲率半径</h2>
				<div class="stu-info">
					<div class="stu-info-item">
						<span>学号：</span>
						<span>{{ sid }}</span>
					</div>
					<div class="stu-info-item">
						<span>姓名：</span>
						<span>{{ name }}</span>
					</div>
					<div class="stu-info-item">
						<span>班级：</span>
						<span
							>{{ college }}学院 {{ major }}专业 {{ grade }}级
							{{ classnum }} 班</span
						>
					</div>
				</div>
			</div>
			<!-- 实验的基本信息 -->
			<n-divider title-placement="left">
				<h2>一、实验目的</h2>
			</n-divider>
			<div class="paper-purpose">
				<ol>
					<li>
						<span style="font-size: 16px">{{ model[0].value }}</span
						>&emsp;<span style="font-size: 12px">{{
							model[0].timeStamp
						}}</span>
					</li>
					<li
						><span style="font-size: 16px">{{
							model[1].value
						}}</span
						>&emsp;<span style="font-size: 12px">{{
							model[1].timeStamp
						}}</span></li
					>
					<li
						><span style="font-size: 16px">{{
							model[2].value
						}}</span
						>&emsp;<span style="font-size: 12px">{{
							model[2].timeStamp
						}}</span></li
					>
				</ol>
			</div>
			<n-divider title-placement="left">
				<h2>二、实验仪器</h2>
			</n-divider>
			<div class="paper-instrument">
				<span style="font-size: 16px">{{ model[3].value }}</span
				>&emsp;<span style="font-size: 12px">{{
					model[3].timeStamp
				}}</span>
			</div>
			<n-divider title-placement="left">
				<h2>三、实验原理</h2>
			</n-divider>
			<div class="paper-principle">
				<p class="principles"> 具体内容请参照实验指导书进行学习 </p>
			</div>

			<n-divider title-placement="left">
				<h2>四、数据记录与处理</h2>
			</n-divider>
			<div class="paper-data">
				<!-- 第一个表单 -->
				<h3> 牛顿环测量透镜的曲率半径</h3>
				<table
					border="1"
					cellpadding="2"
					style="
						width: 100%;
						border-collapse: collapse;
						border: 2px solid #000;
					"
					class="ntable"
				>
					<thead>
						<tr>
							<th>环数</th>
							<th>m</th>
							<th>20</th>
							<th>19</th>
							<th>18</th>
							<th>17</th>
							<th>16</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td rowspan="2">环的位置/mm</td>
							<td>左侧</td>
							<!-- <td><span style="font-size: 16px">{{ model[4].value }}</span>&emsp;<span style="font-size: 12px">{{ model[4].timeStamp }}</span></td> -->
							<td>
								<!-- v-show="model[4].length >= 1" -->

								<!-- <div v-show="model[4].length >= 1"> -->
								<!-- <div v-show="model[4].length > 1"> -->
								<div>
									<el-dropdown>
										<span type="primary">
											{{ model[4][0].value }}<br />{{
												model[4][0].timeStamp
											}}
										</span>
										<template #dropdown>
											<el-dropdown-menu
												v-for="(
													item, index
												) in model[4]"
												:key="index"
											>
												<el-dropdown-item>
													<span
														style="font-size: 16px"
														>{{ item.value }}</span
													>&emsp;<span
														style="font-size: 12px"
														>{{
															item.timeStamp
														}}</span
													>
												</el-dropdown-item>
											</el-dropdown-menu>
										</template>
									</el-dropdown>
								</div>

								<!-- </div> -->
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[5][0].value }}<br />{{
											model[5][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[5]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[6][0].value }}<br />{{
											model[6][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[6]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[7][0].value }}<br />{{
											model[7][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[7]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[8][0].value }}<br />{{
											model[8][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[8]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
						</tr>
						<tr>
							<td>右侧</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[9][0].value }}<br />{{
											model[9][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[9]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[10][0].value }}<br />{{
											model[10][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[10]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[11][0].value }}<br />{{
											model[11][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[11]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[12][0].value }}<br />{{
											model[12][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[12]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[13][0].value }}<br />{{
											model[13][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[13]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
						</tr>
						<tr>
							<td colspan="2">环的直径D<sub>m</sub>/mm</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[14][0].value }}<br />{{
											model[14][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[14]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[15][0].value }}<br />{{
											model[15][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[15]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[16][0].value }}<br />{{
											model[16][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[16]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[17][0].value }}<br />{{
											model[17][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[17]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[18][0].value }}<br />{{
											model[18][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[18]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
						</tr>
						<tr>
							<td>环数</td>
							<td>n</td>
							<td>10</td>
							<td>9</td>
							<td>8</td>
							<td>7</td>
							<td>6</td>
						</tr>
						<tr>
							<td rowspan="2">环的位置/mm</td>
							<td>左侧</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[19][0].value }}<br />{{
											model[19][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[19]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[20][0].value }}<br />{{
											model[20][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[20]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[21][0].value }}<br />{{
											model[21][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[21]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[22][0].value }}<br />{{
											model[22][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[22]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[23][0].value }}<br />{{
											model[23][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[23]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
						</tr>
						<tr>
							<td>右侧</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[24][0].value }}<br />{{
											model[24][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[24]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[25][0].value }}<br />{{
											model[25][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[25]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[26][0].value }}<br />{{
											model[26][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[26]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[27][0].value }}<br />{{
											model[27][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[27]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[28][0].value }}<br />{{
											model[28][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[28]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
						</tr>
						<tr>
							<td colspan="2">环的直径D<sub>n</sub>/mm</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[29][0].value }}<br />{{
											model[29][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[29]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span type="primary">
										{{ model[30][0].value }}<br />{{
											model[30][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[30]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[31][0].value }}<br />{{
											model[31][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[31]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[32][0].value }}<br />{{
											model[32][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[32]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[33][0].value }}<br />{{
											model[33][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[33]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
						</tr>
						<tr>
							<td colspan="2"
								>D<sub>m</sub><sup>2</sup>/mm<sup>2</sup></td
							>
							<td>
								<el-dropdown>
									<span>
										{{ model[34][0].value }}<br />{{
											model[34][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[34]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[35][0].value }}<br />{{
											model[35][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[35]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[36][0].value }}<br />{{
											model[36][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[36]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[37][0].value }}<br />{{
											model[37][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[37]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[38][0].value }}<br />{{
											model[38][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[38]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
						</tr>
						<tr>
							<td colspan="2"
								>D<sub>n</sub><sup>2</sup>/mm<sup>2</sup></td
							>
							<td>
								<el-dropdown>
									<span>
										{{ model[39][0].value }}<br />{{
											model[39][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[39]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[40][0].value }}<br />{{
											model[40][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[40]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[41][0].value }}<br />{{
											model[41][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[41]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[42][0].value }}<br />{{
											model[42][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[42]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[43][0].value }}<br />{{
											model[43][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[43]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<span>(</span>D<sub>m</sub><sup>2</sup>-D<sub
									>n</sub
								><sup>2</sup><span>)</span>/mm<sup>2</sup>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[44][0].value }}<br />{{
											model[44][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[44]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[45][0].value }}<br />{{
											model[45][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[45]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[46][0].value }}<br />{{
											model[46][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[46]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[47][0].value }}<br />{{
											model[47][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[47]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[48][0].value }}<br />{{
											model[48][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[48]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
						</tr>
						<tr>
							<td colspan="2">凸透镜半径R/m</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[49][0].value }}<br />{{
											model[49][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[49]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[50][0].value }}<br />{{
											model[50][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[50]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[51][0].value }}<br />{{
											model[51][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[51]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[52][0].value }}<br />{{
											model[52][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[52]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
							<td>
								<el-dropdown>
									<span>
										{{ model[53][0].value }}<br />{{
											model[53][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[53]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
						</tr>
						<tr>
							<td colspan="2">R/m</td>
							<td colspan="5">
								<el-dropdown>
									<span>
										{{ model[54][0].value }}<br />{{
											model[54][0].timeStamp
										}}
									</span>
									<template #dropdown>
										<el-dropdown-menu
											v-for="item in model[54]"
											:key="item.kid"
										>
											<el-dropdown-item>
												<span style="font-size: 16px">{{
													item.value
												}}</span
												>&emsp;<span
													style="font-size: 12px"
													>{{ item.timeStamp }}</span
												>
											</el-dropdown-item>
										</el-dropdown-menu>
									</template>
								</el-dropdown>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
			<!-- 第五个表单 -->
			<n-divider title-placement="left">
				<h2>五、实验分析</h2>
			</n-divider>
			<div class="paper-analyze">
				<div style="margin-bottom: 10px; font-size: 17px"
					>1..牛顿环实验是用测量暗环直径的方法来向接测量平凸透镜的曲率半径的，那么用亮环可
					以吗？为什么？</div
				>
				<span style="font-size: 16px">{{ model[55].value }}</span
				>&emsp;<span style="font-size: 12px">{{
					model[55].timeStamp
				}}</span>
				<div style="margin-bottom: 10px; font-size: 17px"
					>2.
					实验中观测到的于涉环中心为什么是一个圈斑而不是一个点？</div
				>
				<span style="font-size: 16px">{{ model[56].value }}</span
				>&emsp;<span style="font-size: 12px">{{
					model[56].timeStamp
				}}</span>
			</div>
			<div class="btn-group">
				<el-button type="primary" @click="exOk()">通过</el-button>
				<el-button type="success" @click="exFix()">需要修改</el-button>
			</div>
		</n-card>
	</div>
</template>
<script lang='ts' setup>
//@ts-nocheck
// 关闭ts检查
// @ts-nocheck
import { ref, computed, nextTick, onMounted } from 'vue'
import { elementDark, NInput } from 'naive-ui'
import { useRoute, useRouter } from 'vue-router'
import { useGlobalStore } from '../../../store/GlobalStore'
import { TeachergetDetailEx, changeState } from '@/api/request'
const route = useRoute()
// 试卷头的基本信息
// 使用onMounted生命周期函数
const jwtToken = localStorage.getItem('jwtToken')

const store = useGlobalStore()
const cid = route.query.cid
const sid = route.query.sid
const rid = route.query.rid
const eid = route.query.eid
const name = route.query.name
const classnum = route.query.classNum
const college = route.query.college
const grade = route.query.grade
const major = route.query.major

const tid = store.userInfo.tid
onMounted(() => {
	// name.value = localStorage.getItem('name')
	// sno.value = localStorage.getItem('snoId')
	// sClass.value = localStorage.getItem('className')
	// expName.value = localStorage.getItem('expName')
	console.log(rid, 'rid是')
	console.log('token是', jwtToken)

	// 获取保存的信息
	TeachergetDetailEx(jwtToken, 16, rid).then((res) => {
		console.log(res.data.data[0], 'socket数据')
		const source = res.data.data[0] //socket数据
		for (const key in source) {
			const matchResult = key.match(/([tv])(\d+)_(k[0-9_]+)/)
			if (matchResult) {
				console.log('匹配结果', matchResult)
				const [all, cate, index, kid] = matchResult
				model.value.forEach((item) => {
					if (item[0].kid == kid) {
						if (cate == 'v') {
							item[index].value = source[key]
						} else if (cate == 't') {
							item[index].timeStamp = source[key]
						}
					}
				})
			}
		}
		// console.log('处理后', model.value)
		// 排序
		model.value.forEach((item) => {
			console.log(item, 'item')
			item.sort((a, b) => {
				return new Date(b.timeStamp) - new Date(a.timeStamp)
			})
			// console.log(item, '排序后的item')
		})
		// console.log('排序后', model.value)
	})
})
const ws = new WebSocket(
	`ws://210.44.37.172:8082/message?id=${tid}&role=teacher`
)
ws.onopen = function (e) {
	console.log('连接成功')
}
ws.onmessage = function (e) {
	console.log(e.data, '接收返回的消息')
	console.log(JSON.parse(e.data), '解析一下的数据')
	handleMessage(e)
}

const handleMessage = (e) => {
	if (JSON.parse(e.data).rid == rid) {
		// 1.克隆数组,不直接修改元数组
		// const cloneData = JSON.parse(JSON.stringify(model.value))
		model.value.forEach((element) => {
			if (JSON.parse(e.data).kid.indexOf(element[0].kid) !== -1) {
				if (element[0].value == '') {
					element[0].value = JSON.parse(e.data).value
					element[0].timeStamp = JSON.parse(e.data).timeStamp
				} else {
					element.unshift({
						kid: JSON.parse(e.data).kid,
						value: JSON.parse(e.data).value,
						timeStamp: JSON.parse(e.data).timeStamp,
					})
				}
			}
			console.log(element)
		})
		// //2.对新数组排序
		// cloneData.forEach((item) => {
		// 	item.sort((a, b) => {
		// 		return new Date(b.timeStamp) - new Date(a.timeStamp)
		// 	})
		// 	console.log(item, '排序后的item')
		// })
		// //3.更新model.value
		// model.value = cloneData
		// console.log('排序后', model.value)
	}
}
// const modelSort = () => {
// 	model.value.forEach((item) => {
// 		item.sort((a, b) => {
// 			return new Date(b.timeStamp) - new Date(a.timeStamp)
// 		})
// 		console.log(item, '排序后的item')
// 	})
// 	console.log('消息排序后', model.value)
// }
ws.onclose = function () {
	console.log('连接关闭')
}
ws.onerror = function () {
	console.log('连接出错')
}
const checked = ref(new Array(47).fill(true))
// 复选框状态发生改变
const getState = function () {
	console.log(checked.value)
}
// 实验通过
const exOk = () => {
	changeState(jwtToken, rid, 3).then((res) => {
		console.log(res)
		console.log('rid', rid)

		ElMessage.success('已通过')
	})
}
const exFix = () => {
	changeState(jwtToken, rid, 1).then((res) => {
		console.log(res)
		ElMessage.success('反馈成功')
	})
}
const ceshi = ref([
	[
		{ kid: 'k1', value: '111', timeStamp: '231eweeeeeeeeee2' },
		// { kid: 'k2', value: '222', timeStamp: '12312' },
		// { kid: 'k3', value: '333', timeStamp: '12312' },
	],
	[
		{ kid: 'k1', value: '111.1', timeStamp: '' },
		{ kid: 'k1', value: '222.2', timeStamp: '' },
		{ kid: 'k1', value: '333.3', timeStamp: '' },
	],
])
const model = ref([
	[{ kid: 'k1', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k2', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k3', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k4', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k5_1', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k5_2', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k5_3', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k5_4', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k5_5', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k6_1', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k6_2', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k6_3', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k6_4', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k6_5', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k7_1', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k7_2', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k7_3', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k7_4', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k7_5', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k8_1', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k8_2', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k8_3', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k8_4', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k8_5', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k9_1', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k9_2', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k9_3', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k9_4', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k9_5', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k10_1', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k10_2', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k10_3', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k10_4', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k10_5', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k11_1', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k11_2', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k11_3', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k11_4', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k11_5', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k12_1', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k12_2', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k12_3', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k12_4', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k12_5', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k13_1', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k13_2', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k13_3', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k13_4', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k13_5', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k14_1', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k14_2', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k14_3', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k14_4', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k14_5', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k15', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k16', value: '', timeStamp: '' }, {}, {}, {}, {}],
	[{ kid: 'k17', value: '', timeStamp: '' }, {}, {}, {}, {}],
])
</script>
<style lang="scss" scoped>
.example-showcase .el-dropdown-link {
	cursor: pointer;
	color: var(--el-color-primary);
	display: flex;
	align-items: center;
}
.paper-title {
	.stu-info {
		display: flex;
		align-items: center;

		.stu-info-item {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin: 10px;
		}
	}
}

.ntable {
	margin: 10px;

	thead {
		background-color: #999;

		th {
			width: 100px;
			height: 50px;
			line-height: 50px;
			border: 2px solid black;
		}
	}

	tr {
		td {
			width: 100px;
			height: 50px;
			border: 2px solid black;
		}
	}
}

.paper-purpose {
	li {
		margin-top: 10px;
	}
}

.form1 {
	.form-item {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin: 10px;

		.input-group {
			display: flex;
			justify-content: space-between;
			align-items: center;
			width: 100%;

			.input {
				width: 100%;
			}
		}
	}
}

table {
	margin: 10px;

	tr {
		td {
			text-align: center;
			padding: 10px;

			input {
				width: 100%;
				height: 100%;
				//border: none;
				outline: none;
				text-align: center;
				box-sizing: border-box;

				&:focus {
					border-radius: 5px;
					border: 1px solid #000;
				}
			}
		}
	}
}

.btn-group {
	// 右下角
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	margin: 10px;

	.n-button {
		margin-left: 10px;
	}
}
</style>